feat: Add Modular Pipeline for Stable Diffusion 3 (SD3)#13324
feat: Add Modular Pipeline for Stable Diffusion 3 (SD3)#13324AlanPonnachan wants to merge 7 commits intohuggingface:mainfrom
Conversation
| class TestSD3Img2ImgModularPipelineFast(ModularPipelineTesterMixin): | ||
| pipeline_class = SD3ModularPipeline | ||
| pipeline_blocks_class = SD3AutoBlocks | ||
| pretrained_model_name_or_path = "hf-internal-testing/tiny-sd3-pipe" |
There was a problem hiding this comment.
the tests currently point to hf-internal-testing/tiny-sd3-pipe. So tests are failing as of now. I think this happens since /tiny-sd3-pipe lacks modular_model_index.json.
could someone on the team push a hf-internal-testing/tiny-sd3-modular testing repository with a modular_model_index.json?
Once that infrastructure is available on the Hub, I will update the pretrained_model_name_or_path and run my tests.
There was a problem hiding this comment.
I think for now, we could first load "hf-internal-testing/tiny-sd3-pipe" in a ModularPipeline and then save and push to a repository on the Hub. We can use it throughout and PR. Once the PR is close to merge, we can transfer the repo to the "hf-internal-testing" org. Does that work?
|
@AlanPonnachan thanks for this PR! Could you also provide some test code and sample outputs? |
sayakpaul
left a comment
There was a problem hiding this comment.
Thanks for getting started on this! I left some comments (majorly on the use of guidance).
src/diffusers/modular_pipelines/stable_diffusion_3/before_denoise.py
Outdated
Show resolved
Hide resolved
src/diffusers/modular_pipelines/stable_diffusion_3/before_denoise.py
Outdated
Show resolved
Hide resolved
src/diffusers/modular_pipelines/stable_diffusion_3/before_denoise.py
Outdated
Show resolved
Hide resolved
|
@claude can you review this? |
|
I'll analyze this and get back to you. |
|
@bot /style |
|
Style bot fixed some files and pushed the changes. |
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |

What does this PR do?
This PR introduces the modular architecture for Stable Diffusion 3 (SD3), implementing both Text-to-Image (T2I) and Image-to-Image (I2I) pipelines.
Key additions:
SD3ModularPipelineandSD3AutoBlocksto the dynamic modular pipeline resolver.BlockStateTestSD3ModularPipelineFastandTestSD3Img2ImgModularPipelineFasttest suites.Related issue: #13295
Before submitting
documentation guidelines, and
here are tips on formatting docstrings.
Who can review?
@sayakpaul @asomoza